import request from '@/utils/request';

// 新增限时抢优惠券配置
export function addTime(data) {
  return request({
    url: `/managerAPI/coupons-center/coupons/center/add-time`,
    method: 'post',
    data,
  })
}

// 修改限时抢活动
export function editTime(data) {
  return request({
    url: `/managerAPI/coupons-center/coupons/center/edit-time/${data.id}`,
    method: 'post',
    data,
  })
}

// sahnchu
export function delTime(id) {
  return request({
    url: `/managerAPI/coupons-center/coupons/center/del-time/${id}`,
    method: 'get',
  })
}

// 领劵中心优惠券查询
export function queryList(couponsType) {
  return request({
    url: `/managerAPI/coupons-center/coupons/center/query-list/${couponsType}`,
    method: 'get',
  })
}

// 新增领券接口
export function addReceive(data) {
  return request({
    url: `/managerAPI/coupons-center/couopons/center/add-receive`,
    method: 'post',
    data,
  })
}

// 修改领券活动
export function editReceive(data) {
  return request({
    url: `/managerAPI/coupons-center/coupons/center/edit-receive/${data.id}`,
    method: 'post',
    data,
  })
}

export function delReceive(id) {
  return request({
    url: `/managerAPI/coupons-center/coupons/center/del-receive/${id}`,
    method: 'get',
  })
}